Ext.onReady(
    function (){
        var store = new Ext.data.JsonStore({
            // store configs
            // autoDestroy: true,
            // autoSync: true,
            autoLoad: true,
            storeId: 'myStore',

            proxy: {
                type: 'ajax',
                url: '/static/js/get.php',
                reader: {
                    type: 'json',
                    // root: 'images',
                    idProperty: 'name'
                }
            },

            //另外，可以配Ext.data.Model的名称(如 Ext.data.Store 中的例子)
            fields: [{'name':'id'}, {name:'name', type: 'string'}, {name:'password', type:'string'}]
        });
        // store.sync();
        // store.load();
        console.log(store);
        Ext.create('Ext.grid.Panel',{
            title: '简单Grid示例',
            store: store,
            // mode: 'remote',
            // applyTo: 'grid',
            width:250,
            height:180,
            frame:true,
            columns:[
                {header:"id",width:50,dataIndex:'id',sortable:true},
                {header:"姓名",width:80,dataIndex:'name',sortable:true},
                {header:"年龄",width:80,dataIndex:'password',sortable:true}
            ],
            renderTo: Ext.getBody()
        });
    }
);